package com.chenyaowei.marketing.mapper;

import com.chenyaowei.marketing.domain.CywSpuDiscount;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品折扣Mapper接口
 *
 * @author 陈耀威
 * @date 2023-11-28
 */
public interface CywSpuDiscountMapper
{
    /**
     * 查询商品折扣
     *
     * @param id 商品折扣主键
     * @return 商品折扣
     */
    public CywSpuDiscount selectCywSpuDiscountById(Long id);

    /**
     * 查询商品折扣列表
     *
     * @param cywSpuDiscount 商品折扣
     * @return 商品折扣集合
     */
    public List<CywSpuDiscount> selectCywSpuDiscountList(CywSpuDiscount cywSpuDiscount);

    /**
     * 新增商品折扣
     *
     * @param cywSpuDiscount 商品折扣
     * @return 结果
     */
    public int insertCywSpuDiscount(CywSpuDiscount cywSpuDiscount);

    /**
     * 修改商品折扣
     *
     * @param cywSpuDiscount 商品折扣
     * @return 结果
     */
    public int updateCywSpuDiscount(CywSpuDiscount cywSpuDiscount);

    /**
     * 删除商品折扣
     *
     * @param id 商品折扣主键
     * @return 结果
     */
    public int deleteCywSpuDiscountById(Long id);

    /**
     * 批量删除商品折扣
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCywSpuDiscountByIds(Long[] ids);

    List<CywSpuDiscount> selectListBySpuIds(@Param("spuIds") List<Long> spuIds);
}
